
<body>

    <div class="warp h">
        <!--header-->
        <header class="hd br">
            <a href="<?php echo $base_url?>home/account/myInfo" class="l-icon only-icon">
            <i class="iconfont icon-left1"></i>            
            
        </a>
            <p class="tit2">
                我的订单
            </p>
        </header>

        <ul class="order-list">
        <?php  foreach ($data as $key => $value) : ?>
            <li>             
                <div class="line-box"></div>
                <div class="order-itme">
                    <div class="order-box-3">
                        <span class="r">
                            <?php if($value['status'] == 4): ?>
                                <span class="statue warn" style="color:#DDDDDD;">支付超时</span>
                            <?php elseif($value['status'] == 3): ?>
                                <span class="statue warn">待付款</span>
                            <?php elseif($value['status'] ==2 ): ?>
                                <span class="statue warn" style="color:#32CD32;">已发货</span>
                            <?php else: ?>
                                <span class="statue warn" style="color:#32CD32;">已完成</span>
                            <?php endif; ?>
                        </span>
                        <span class="l">
                            共<span><?php echo $value['amount'];?></span>件商品
                        </span>
                    </div>
                    <?php foreach($value['detail'] as $goods_id => $detail): ?>                   
                        <div class="order-box-1 br-none">
                            <!-- <a href="<?php if($value['status']==4 || $value['status']==1 || $value['status']==2):?>/home/order/orderinfo?orderid=<?php echo $value['orderid']?><?php else: ?>javascript:void(0);<?php endif;?>"> -->
                            <a href="<?php echo $base_url; ?>home/order/orderinfo?orderid=<?php echo $value['orderid']; ?>">
                            <div class="l">
                                <img src="<?php echo $detail['urlimg']?>" alt="<?php echo $detail['imgname'];?>">
                            </div>
                            <div class="r">
                                <p class="tit">
                                    <?php echo $detail['goodsname'];?>
                                </p>
                                <!-- <p class="ms-tit" style="display: none;">
                                    颜色分类：黄色；
                                </p> -->
                                <p class="price-num">
                                    <span>¥</span><?php echo $detail['price']?>                                    
									<span class="num" >x<?php echo $detail['amount']?></span>
                                </p>
                            </div>
                            </a>
                        </div>
                    <?php endforeach; ?>
                    <div class="order-box-4">  
                        <div class="r">
                        <?php if($value['status']==3) : ?>
                        <a href="<?php echo $base_url?>home/order/orderinfo?orderid=<?php echo $value['orderid']?>" class="pay_btn">抢先支付</a>
                        <?php elseif($value['status']==4):?>
                        <a href="<?php echo $base_url?>home/order/orderinfo?orderid=<?php echo $value['orderid']?>" class="pay_btn err">抢先支付</a>
                        <?php endif;?>
                        </div>
                        <div class="l">
                            实付：<span class="price"><span>¥</span><?php echo $value['price']?></span>
                        </div>
                    </div>
                </div>
            </li>

        <?php  endforeach;?>   
        </ul>


        <div class="line-box"></div>
        <?php if(empty($data)){ ?>                      
            <div class="noneOrder">
                <img src="<?php echo $base_url?>static/dist/images/noneorder.jpg" alt="">
            </div>

        <?php    } ?>
        <div class="pd-box"></div>


    </div>

    <script src="<?php echo $base_url?>static/dist/js/base.js"></script>

    <script>
        // 矫正rem
        function correctrem() {
            var rem_full_width = $("<div id='rem-test' style='width:7.5rem'></div>").appendTo($('body')).width();
            var device_width = Math.min(document.documentElement.clientWidth, 640);
            if (rem_full_width !== device_width) {
                document.documentElement.style.fontSize = (device_width / 7.5) * (device_width / rem_full_width) + 'px';
            }
            $('#rem-test').remove();
        }
        correctrem();
    </script>

</body>

</html>
